#ifndef  __USART_H__
#define  __USART_H__

#include "gd32f30x.h"
#include "stdio.h"


typedef enum
{
  HAL_OK       = 0x00U,
  HAL_ERROR    = 0x01U,
  HAL_BUSY     = 0x02U,
  HAL_TIMEOUT  = 0x03U
} HAL_StatusTypeDef;

#define UART_HandleTypeDef uint32_t


extern void _Error_Handler(char *, int);

void Usart0_Init(void);

void Usart0_Sendbyte(uint8_t data);
void HAL_UART_RxCpltCallback(UART_HandleTypeDef huart);
void HAL_UART_TxCpltCallback(UART_HandleTypeDef huart);

#endif
